import Setting from './index.vue';
import Blog from './blog.vue';						//日志管理
import userList from './userList.vue'; 				//用户列表
import addUser from './addUser.vue'; 				//添加用户
import updateUser from './updateUser.vue'; 			//修改用户
import userPro from './userPro.vue'; 				//角色权限
import supplierList from './supplierList.vue'; 		//供应商列表
import addSupplier from './addSupplier.vue'; 		//添加供应商
import updateSupplier from './updateSupplier.vue'; 	//修改供应商
import {
	addApi
} from '@/utils/http';

export default {
	name: "setting",
	path: "setting",
	component: Setting,
	meta: {
		title: "系统设置",
		menu: "系统设置"
	},
	children: [{
			name: "Blog",
			path: "",
			component: Blog,
			alias: 'Blog',
			meta: {
				title: "日志管理"
			}
		},
		{
			name: "userList",
			path: "userList",
			component: userList,
			meta: {
				title: "用户列表"
			}
		},
		{
			name: "addUser",
			path: "addUser",
			component: addUser,
			meta: {
				title: "新增用户"
			}
		},
		{
			name: "updateUser",
			path: "updateUser",
			component: updateUser,
			meta: {
				title: "修改用户"
			}
		},
		{
			name: "userPro",
			path: "userPro",
			component: userPro,
			meta: {
				title: "角色权限"
			}
		},
		{
			name: "supplierList",
			path: "supplierList",
			component: supplierList,
			meta: {
				title: "客户列表"
			}
		},
		{
			name: "addSupplier",
			path: "addSupplier",
			component: addSupplier,
			meta: {
				title: "添加客户"
			}
		}, {
			name: "updateSupplier",
			path: "updateSupplier/:id",
			component: updateSupplier,
			meta: {
				title: "修改客户"
			}
		},
	]
}

export const Api = {
	supplierQuery: "supplier/query", //供应商列表
	supplierControl: "supplier/control", //开启、关闭供应商
	getDetails: "supplier/getDetails", //查询详情
	supplierSave: "supplier/save", //修改后保存
	supplierAdd: "supplier/add", //添加供应商
}

addApi(Api);